﻿#pragma once

// 插入list列表嵌套结构 有赋值
#define NESTED_STRCUCT_ASSIGN_PUSHBACK(C, P, ST, KEY, VALUETYPE)\
[this](const void* vp){\
	if (m_list_OperatorPtr.empty()) return;\
	if (m_list_StartObjKey.empty()) return;\
	C* cp = static_cast<C*>(m_list_OperatorPtr.back());\
	CHECK_RETURN(cp);\
	ST st;\
	VALUETYPE* value = static_cast<VALUETYPE*>(vp);\
	CHECK_RETURN(value);\
	st.KEY = *value;\
	cp->P.push_back(st);\
	m_list_OperatorPtr.push_back(&cp->P.back()); }\

// 插入list列表嵌套结构
#define NESTED_STRCUCT_PUSHBACK(C, P, ST)\
[this](const void* vp){\
	if (m_list_OperatorPtr.empty()) return;\
	if (m_list_StartObjKey.empty()) return;\
	C* cp = static_cast<C*>(m_list_OperatorPtr.back());\
	CHECK_RETURN(cp);\
	ST st;\
	cp->P.push_back(st);\
	m_list_OperatorPtr.push_back(&cp->P.back()); }\

// 插入struct嵌套结构
#define NESTED_STRCUCT_INSERT(C, P)\
[this](const void* vp){\
		if (m_list_OperatorPtr.empty()) return;\
		if (m_list_StartObjKey.empty()) return;\
		C* cp = static_cast<C*>(m_list_OperatorPtr.back());\
		CHECK_RETURN(cp);\
		m_list_OperatorPtr.push_back(&cp->P); }\



struct _st_id
{
	int m_id;
};

struct _st_IndexName
{
	std::wstring m_wstr_IndexName;	// 索引名
};

struct _st_culture
{
	std::wstring m_wstr_culture;	// 文化
};

struct _st_religion
{
	std::wstring m_wstr_religion;	// 宗教
};